Poll: What times are best for you for office hours?
Today is different
Ava will hold office hours from 5:00pm - 6:00pm EST.
Office hours will always be held at the same Zoom link.
Poll: What times are best for you for office hours?
Today is different
Ava will hold office hours from 5:00pm - 6:00pm EST.
Office hours will always be held at the same Zoom link.
RStudio is an Integrated Development Environment (IDE) for R
[source]
Easier working with R
More information

In a .R file (we call a script), code is saved on your disk
Super useful “cheat sheet”: https://github.com/rstudio/cheatsheets/raw/master/rstudio-ide.pdf
If RStudio doesn’t look the way you want (or like our RStudio), then do:
RStudio –> Preferences –> Pane Layout
History
To do this lab we need to:
(Also on the website schedule page - Lab for day 1) 2) Find the downloaded file on your computer 3) Open the file in RStudio
This may require finding your downloads on your computer.
Recall that these videos can help:
If you have a PC: https://youtu.be/we6vwB7DsNU
If you have a Mac: https://www.youtube.com/watch?v=Ao9e0cDzMrE
R Markdown files (.Rmd) help generate reports that include your code and output. Think of them as fancier scripts.
Go to File → New File → R Markdown
Call your file “first_markdown”
Within R Markdown files are code “chunks”
This is where you can type R code and run it!
To create a new R code chunk:
Copy paste an existing chunk in the R Markdown file and replace the code OR
You can run all chunks above a specific chunk using this button:
You can specify if a chunk will be seen in the report or not.
This will create a report from the R Markdown document!
Ctrl + Enter in your script evaluates that line of code
Ctrl+1 takes you to the script pageCtrl+2 takes you to the consoleIn RStudio Click the Edit tab –> scroll down to Preferences… –> R Markdown
Uncheck the following:
you can test code in the console
you can save code in a chunk in the editor (Markdown file)
When you type in a function name, a pop up will preview documentation to help you. It also helps you remember the name of the function if you don’t remember all of it!
?If you know the name of a package or function:
Type ?package_name or ?function_name in the console to get information about packages and functions.
For example: ?readr or ?read_csv.
If you haven’t loaded a package yet into R than you may get a response that there is no documentation.
Typing in ??package_name can show you packages that you haven’t loaded yet.
💻 Lab
Image by Gerd Altmann from Pixabay